<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD

=======
/
>>>>>>> cf8649493a7a0d95c07c0e301124034b7b9bd07a
=======
/
>>>>>>> cf8649493a7a0d95c07c0e301124034b7b9bd07a
=======
/
>>>>>>> cf8649493a7a0d95c07c0e301124034b7b9bd07a
<template>
  <div class="index">
    <div class="leftBox">
      <div class="imgBox">
        <img :src="list.cover" alt="" class="imgs" />
      </div>
      <div class="mainTitle">
        <span class="title">{{ list.title }}</span
        ><br />
        <i class="timeout"> publishAt&nbsp;&nbsp;{{ list.publishAt }} </i>
      </div>
      <div class="mainBoxHtml">
        <div class="html">
          <div class="mainHtml">
            <div v-html="HtmlData"></div>
            <!-- <ButtonBody /> -->
          </div>
        </div>
        <div class="commentBox">
          <Comment />
        </div>
      </div>
    </div>
    <div class="rightBox" :class="{ fixedBody: fixedFasle }">
      <div class="rightBox1">
        <reommend />
      </div>
      <div class="rightBox2">
        <DetrightbottomBox />
      </div>
    </div>

    <Leftlikes />
  </div>
</template>

<script>
import { articleDetail } from "../../api/index";
import reommend from "../../components/Reommend.vue";
import Leftlikes from "../../components/Leftlikes.vue";
import Comment from "../../components/Comment.vue";
import DetrightbottomBox from "../../components/DetrightbottomBox.vue";
export default {
  components: {
    reommend,
    Leftlikes,
    DetrightbottomBox,
    Comment,
  },
  data() {
    return {
      id: 0,
      list: [],
      list_right_top2: [],
      fixedFasle: false,
      HtmlData: [],
    };
  },
  methods: {
    async List() {
      const { data } = await articleDetail(this.id);
      this.list = data.data;
      this.list_right_top2 = this.list.content;
      this.HtmlData = data.data.html;
    },
  },
  mounted() {
    this.id = this.$route.params.id;
    this.List();
  },
};
</script>

<style lang="scss">
.index {
  width: 1200px;
  display: flex;
  justify-content: space-between;
}
.leftBox {
  width: 670px;
  background: var(--contentBackground);
  .imgBox {
    width: 670px;
    height: 400px;
    display: flex;
    justify-content: center;

    img {
      width: 95%;
      height: 400px;
    }
  }
  .mainTitle {
    width: 670px;
    height: 150px;
    text-align: center;
    background: var(--contentBackground);
    color: var(--titleHcolor);

    .title {
      text-align: center;
      color: var(--titleHcolor);
      display: inline-block;
      font-size: 40px;
      margin-bottom: 30px;
    }

    .timeout {
      color: var(--titleHcolor);
      display: inline-block;
    }

    .spansLittleBody {
      color: var(--titleHcolor);
      width: 100%;
      height: 33%;
      display: inline-block;
      font-size: 20px;
      text-align: center;
    }
  }

  .mainBoxHtml {
    color: var(--titleHcolor);
    width: 100%;
    .html {
      width: 100%;
    }
    .mainHtml {
      width: 100%;
      height: auto;
      line-height: 35px;
      font-size: 15px;
      background: var(--contentBackground);
      color: var(--titleHcolor);
      p {
        width: 98%;
        margin-left: 2%;
      }

      li {
        width: 100%;
        list-style-type: disc;
        text-indent: 1.5rem;
        list-style-position: inside;
      }

      img {
        width: 100%;
        height: 350px;
        margin-top: 30px;
      }
      table {
        margin-left: 5px;
      }
      h3 {
        margin-left: 5px;
      }
      ul {
        margin-left: 5px;
      }
      h2 {
        width: 98%;
        height: 60px;
        margin-left: 1%;
        line-height: 60px;
        border-bottom: 2px solid rgb(226, 225, 225);
        text-indent: 0.5em;
      }
      h1 {
        width: 98%;
        height: 60px;
        margin-left: 1%;
        line-height: 60px;
        border-bottom: 2px solid rgb(226, 225, 225);
        text-indent: 0.5em;
      }
      pre {
        width: 98%;
        height: auto;
        margin-left: 1%;
        background: rgb(247, 246, 246);
        padding-top: 10px;
        padding-bottom: 10px;
        text-indent: 1rem;
        overflow: hidden;
        .language-js {
          padding-top: 40px;
          padding-left: 30px;
          padding-bottom: 40px;
        }
      }
    }
  }
  .commentBox {
    width: 100%;
    background: var(--contentBackground);
    color: var(--titleHcolor);
  }
}
.rightBox {
  margin-left: 60px;
  height: 100%;
  top: 80px;
  .rightBox1 {
    height: 280px;
    background: var(--contentBackground);

    .tagTitle {
      width: 318px;
      height: 50px;
      line-height: 50px;
      font-size: 18px;
      border-bottom: 1px solid #f4f4f4;
      position: relative;
    }
    .tagTitle b {
      margin-top: 8px;
      position: absolute;
      margin-left: 5px;
    }
  }
  .rightBox2 {
    margin-top: 5%;
    width: 100%;
    height: 430px;
    background: var(--contentBackground);
    margin-left: 70px;
  }
}
.fixedBody {
  width: 24%;
  height: auto;
  z-index: 100;
  position: fixed;
  top: 0;
  right: 155px;
  margin-top: 15px;
}
</style>
